home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / FLASH005.422 < prev    next >
Text File  |  1993-03-29  |  4KB  |  127 lines

  1. FLASH005.MOD-Simulates a multi-node system showing who's on.
  2. Josh Weide #267 @19911
  3. Wednesday, March 24, 1993  10:38 pm
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name: FLASH005.MOD                   Date: 3/24/93                     │
  6. │ Mod Author: Flashman #1 @9930 WWIVNet                                      │
  7. │ Difficulty: Practically installs itself.                                   │
  8. │ WWIV Version: 4.22 and probably several others                             │
  9. │ Files Affected: lilo.c, msgbase.c, fcns.h                                  │
  10. │ Description: Makes users think that you've installed new phone lines by    │
  11. │              showing a phony node list with other users' names in it.      │
  12. └────────────────────────────────────────────────────────────────────────────┘
  13.    I saw something similar to this not too long ago, but frankly, I like mine
  14. better. What it does is shows a list similar to what one would see on a
  15. multi-line board: A list of who's on each node and a stat or two about them.
  16. Here's a sample of what it would look like:
  17.  
  18. 7You're connected to 5WWIVShare Node 2 7at 59600 bps7.
  19.  
  20. 2Node     User Online            Speed 
  21. 7──────────────────────────────────────────────────
  22. 21        Moo Goo Gai Pan #16     14400/v.32bis
  23. 22        1Flashman #1             9600
  24. 23        5Waiting for call
  25. 24        Cornjob #8              2400
  26. 25        5Waiting for call
  27.  
  28.   It picks by random which users are online, on which node, their speed, which
  29. nodes are waiting for callers, and which node the current user is connected to.
  30. Spiffy, eh? And all it takes is a little block reading. Let's begin now, shall
  31. we?
  32.  
  33. DISCLAIMER: Are you kidding?
  34.  
  35. STEP ONE: Back up your source code just to be able to say you did.
  36.  
  37. STEP TWO: Open msgbase.c and block read the following void in at the end of
  38.           the file:
  39.  
  40.  
  41. void fakenodes(void)
  42. {
  43.   int un,i,i1,i3;
  44.   unsigned short i2;
  45.   char s[80],s2[80];
  46.   userrec u;
  47.  
  48.   i=((rand() % 5)+1);
  49.   npr("7You're connected to 5WWIVShare Node %d 7at 5%s bps7.\r\n",i,curspeed);
  50.   nl();
  51.   prt(2,"Node #   User Online              Speed");
  52.   nl();
  53.   if (okansi())
  54.     prt(7,"────────────────────────────────────────────────────────────\r\n");
  55.   else
  56.     pl("----------------------------------------------------------------");
  57.   for (i3=1; i3<6; i3++) {
  58.    if (i3==i) {
  59.      s[0]=0;
  60.      sprintf(s2,"1%-25s   %s",nam(&thisuser,usernum),curspeed);
  61.    } else {
  62.     i2=((rand() % status.users)+1);
  63.     if ((i2==usernum) || ((rand() % 2)==1)) {
  64.       strcpy(s2,"5Waiting for caller");
  65.       s[0]=0;
  66.     } else {
  67.       read_user(i2,&u);
  68.       strcpy(s2,nam(&u,i2));
  69.     s[0]=0;
  70.     switch(rand() % 6) {
  71.       case 0:
  72.         strcpy(s,"14400/v.32bis");
  73.         break;
  74.       case 1:
  75.         strcpy(s,"9600");
  76.         break;
  77.       case 2:
  78.         strcpy(s,"2400");
  79.         break;
  80.       case 3:
  81.         strcpy(s,"9600/v.32bis");
  82.         break;  
  83.       case 4:
  84.         strcpy(s,"14400/v.42bis/MNP-5");
  85.         break;
  86.       case 5:
  87.         strcpy(s,"9600/v.42bis");
  88.         break;
  89.     }
  90.  
  91.     }
  92.    } 
  93.     npr("2%-4d       %-25s   %s\r\n",i3,s2,s);
  94.   }
  95. }
  96.  
  97. /* END OF BLOCK READ */
  98.  
  99. Save msgbase.c.
  100.  
  101. STEP THREE: Load lilo.c and find void logon(void). Look for and add the
  102.             following code. /* == */ signifies existing code and /* ++ */
  103.             signifies lines to add.
  104.  
  105. /* == */  if (incom && live_user) {
  106. /* == */    i=printfile("LOGON");
  107. /* == */    if ((!i) && (!(thisuser.sysstatus & sysstatus_pause_on_page)))
  108. /* == */      pausescr();
  109. /* == */  }
  110. /* ++ */  nl();
  111. /* ++ */  fakenodes();
  112. /* == */  strcpy(xdate,date());
  113. /* == */  if (strcmp(xdate,thisuser.laston)==0)
  114. /* == */    ++thisuser.ontoday;
  115.  
  116. Save lilo.c.
  117.  
  118. STEP FOUR: Either run MAKE FCNS or load fcns.h and add void fakenodes(void)
  119.            to the end of the group for msgbase.c.
  120.  
  121. STEP FIVE: Compile. That's it! All done!
  122.  
  123.   If you plan to extract and/or use this mod, hit 'A' right now and tell me
  124. so. I like to know how many people use my mods. Thanks.
  125.  
  126.                                         7░▒▓█1Flashman7█▓▒░
  127.